package org.zuel.boot.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.zuel.boot.demo.entity.ChartData;
import org.zuel.boot.demo.mapper.ChartMapper;
import org.zuel.boot.demo.service.IChartService;

import java.util.List;

/**
 * 图表数据服务实现类
 */
@Service
public class ChartServiceImpl extends ServiceImpl<ChartMapper, ChartData> implements IChartService {

    // 正确注入 ChartMapper 接口
    @Autowired
    private ChartMapper chartMapper;

    @Override
    public List<ChartData> getAllChartData() {
        return this.list();
    }

    @Override
    public List<ChartData> selectIndustryData() {
        return chartMapper.selectIndustryData();
    }

    @Override
    public List<ChartData> selectCityData() {return chartMapper.selectCityData();}

    @Override
    public List<ChartData> selectIndustryGrowth() {return chartMapper.selectIndustryGrowth();}

    @Override
    public List<ChartData> selectRate() {return chartMapper.selectRate();}
}